import fetch, { BaseResponse } from '@/domain/authority/api';
import { ReqParam, MenuItem } from '../types/authority';

/**
 * 获取菜单权限
 * @returns ResMenu
 */

export async function getMenuAuthority(param: ReqParam): Promise<BaseResponse<MenuItem[]>> {
  const { data } = await fetch.get<BaseResponse<MenuItem[]>>('/xwadmin/api/user/getUserMenuPerm', { ...param });
  return data;
}
